home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / edit / tde40.zip / default.h < prev    next >
Text File  |  1994-06-05  |  28KB  |  591 lines

  1. /*
  2.  * New editor name:  TDE, the Thomson-Davis Editor.
  3.  * Author:           Frank Davis
  4.  * Date:             June 5, 1991
  5.  *
  6.  * This modification of Douglas Thomson's code is released into the
  7.  * public domain, Frank Davis.  You may distribute it freely.
  8.  *
  9.  * Set up default dispatch table.
  10.  *
  11.  * If you want to change the default key assignments - it's really easy.  All
  12.  * you have to do is set the appropriate array element to the desired function
  13.  * and then recompile the source code.  The available functions are in the
  14.  * define.h file.
  15.  *
  16.  * The key code returned by pressing a function key is added to 256.  This is
  17.  * done because it makes it easy to allow the ASCII and Extended ASCII
  18.  * characters to get thru as normal characters and to trap the function keys
  19.  * because they are greater than 256.  Once a function is detected, 256 is
  20.  * subtracted from the key code, which maps the function key codes to
  21.  * 0-256 (MAX_KEYS).  See function getfunc( ) in console.c.
  22.  *
  23.  * Look in the back of the MSC 6.0a manual or a MASM manual to find out what
  24.  * the extended codes are for the various key combinations.  For example,
  25.  * ALT+M = 50.  Add 50 to 256 which equals 306.
  26.  *
  27.  * **************************************************************************
  28.  * **** In tde, version 1.4, I added support for assigning characters    ****
  29.  * **** to Control and Alt keys.  This allows those who need various     ****
  30.  * **** accent and dot characters to assign any ASCII or Extended ASCII  ****
  31.  * **** character to unused function keys.                               ****
  32.  * **************************************************************************
  33.  *
  34.  * **************************************************************************
  35.  * **** In tde, version 1.5, I took out support for assigning characters ****
  36.  * **** to Control and Alt keys.  Macros may now be assigned to function ****
  37.  * **** keys, which will accomplish the same task.                       ****
  38.  * **************************************************************************
  39.  *
  40.  * If you change the default key assignments, you should also change the help
  41.  * screen in help.h to show what function the new keys are assigned to.
  42.  *
  43.  * The insert_overwrite function is assigned the index of 0.  If the key
  44.  * code is less than 256 then a character is written to the file.  DO NOT
  45.  * assign any function to 256, it is used to call insert_overwrite( ) and
  46.  * add text characters to the file.  DO NOT put an index to it in the
  47.  * cfgkeys utility.
  48.  *
  49.  * See the end of this file for default two-key assignments.
  50.  */
  51.  
  52. KEY_FUNC key_func = {
  53.      "$  keys",             /* signature for the .exe file */
  54. /* 256 */
  55.      0,                     /* DO NOT assign this to any function */
  56.      0,                     /* Alt + ESC  -  101 Keyboard */
  57.      AbortCommand,          /* ESC    - manually map to 258 */
  58.      0,                     /* #ESC   - manually map to 259 */
  59. /* 260 */                   
  60.      ClearAllMacros,        /* ^ESC    - mannuall map to 260 */
  61.      0,                     /* no key assigned here */
  62.      Rturn,                 /*  Enter  - manually map to 262 */
  63.      NextLine,              /* #Enter  - manually map to 263 */
  64.      BegNextLine,           /* ^Enter  - manually map to 264 */
  65.      BackSpace,             /*  BackSpace - manually map to 265 */
  66.      BackSpace,             /* #BackSpace - manually map to 266 */
  67.      0,                     /* ^BackSpace - manually map to 267 */
  68.      Tab,                   /*  Tab       - manually map to 268 */
  69.      0,                     /* Control-Break - manually map to 269
  70.                              *    DO NOT assign any function to Control-Break.
  71.                              *    It is used to stop run away functions.
  72.                              */
  73. /* 270 */                   
  74.      0,                     /* Alt + Backspace  - 101 keyboard */
  75.      BackTab,               /* Shift + Tab */
  76.      Quit,                  /* Alt-Q  272 */
  77.      BlockToFile,           /* Alt-W  273 */
  78.      BlockExpandTabs,       /* Alt-E  274 */
  79.      ToggleRuler,           /* Alt-R  275 */
  80.      BlockTrimTrailing,     /* Alt-T  276 */
  81.      UndoDelete,            /* ALT-Y  277 */
  82.      UnMarkBlock,           /* Alt-U  278 */
  83.      ToggleIndent,          /* Alt-I  279 */
  84. /* 280 */                   
  85.      OverlayBlock,          /* Alt-O  280 */
  86.      PrintBlock,            /* Alt-P  281 */
  87.      0,                     /* Alt-[     - 101 keyboard */
  88.      0,                     /* Alt-]     - 101 keyboard */
  89.      0,                     /* Alt-Enter - 101 keyboard */
  90.      0,                     /* manually map Grey Enter to this hole */
  91.      AddLine,               /* Alt-A  286 */
  92.      SortBoxBlock,          /* Alt-S  287 */
  93.      DeleteLine,            /* Alt-D  288 */
  94.      FillBlock,             /* Alt-F  289 */
  95. /* 290 */                   
  96.      DeleteBlock,           /* Alt-G  290 */
  97.      Help,                  /* Alt-H  291 */
  98.      JoinLine,              /* Alt-J  292 */
  99.      KopyBlock,             /* Alt-K  293 */
  100.      MarkLine,              /* Alt-L  294 */
  101.      0,                     /* Alt-;: - 101 keyboard */
  102.      0,                     /* Alt-'" - 101 keyboard */
  103.      0,                     /* Alt-`~ - 101 keyboard */
  104.      0,                     /* manually map Shift+Grey Enter to this hole */
  105.      0,                     /* manually map Control+Greay Enter to this hole */
  106. /* 300 */                   
  107.      ToggleZ,               /* Alt-Z  300 */
  108.      MarkStream,            /* Alt-X  301 */
  109.      CopyBlock,             /* Alt-C  302 */
  110.      ToggleWordWrap,        /* Alt-V  303 */
  111.      MarkBox,               /* Alt-B  304 */
  112.      NumberBlock,           /* Alt-N  305 */
  113.      MoveBlock,             /* Alt-M  306 */
  114.      BlockUpperCase,        /* Alt-<  added for 83/84 keyboards, fmd */
  115.      BlockLowerCase,        /* Alt->  added for 83/84 keyboards, fmd */
  116.      BlockStripHiBit,       /* ALt-?  added for 83/84 keyboards, fmd */
  117. /* 310 */                   
  118.      0,                     /*  hole in key codes, not used */
  119.      0,                     /*  hole in key codes, not used */
  120.      0,                     /*  hole in key codes, not used */
  121.      0,                     /*  hole in key codes, not used */
  122.      0,                     /*  hole in key codes, not used */
  123.      Help,                  /* F1     315 */
  124.      Save,                  /* F2     316 */
  125.      Quit,                  /* F3     317 */
  126.      File,                  /* F4     318 */
  127.      RepeatFindForward1,    /* F5     319 */
  128. /* 320 */                   
  129.      RepeatFindBackward1,   /* F6     320 */
  130.      RepeatFindRegX,        /* F7     321 */
  131.      SplitVertical,         /* F8     322 */
  132.      SplitHorizontal,       /* F9     323 */
  133.      NextWindow,            /* F10    324 */
  134.      0,                     /*  hole in key codes, not used */
  135.      0,                     /*  hole in key codes, not used */
  136.      BegOfLine,             /* Home   327 */
  137.      LineUp,                /* Up     328 */
  138.      ScreenUp,              /* PgUp   329 */
  139. /* 330 */                   
  140.      0,                     /*  hole in key codes, not used */
  141.      CharLeft,              /* Left   331 */
  142.      CenterWindow,          /* Center 332 */
  143.      CharRight,             /* Right  333 */
  144.      0,                     /*  hole in key codes, not used */
  145.      EndOfLine,             /* End    335 */
  146.      LineDown,              /* Down   336 */
  147.      ScreenDown,            /* PgDn   337 */
  148.      ToggleOverWrite,       /* Ins    338 */
  149.      DeleteChar,            /* Del    339 */
  150. /* 340 */                   
  151.      SaveMacro,             /* Shift F1  */
  152.      SaveAs,                /* Shift F2  */
  153.      LoadMacro,             /* Shift F3  */
  154.      EditFile,              /* Shift F4  */
  155.      FindForward,           /* Shift F5  */
  156.      FindBackward,          /* Shift F6  */
  157.      FindRegX,              /* Shift F7  */
  158.      ReplaceString,         /* Shift F8  */
  159.      SizeWindow,            /* Shift F9  */
  160.      PreviousWindow,        /* S